var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');

var router = function (app) {
    app.use(bodyParser.json()); //加载解析json的中间件
    app.use(bodyParser.urlencoded({
        extended: false
    })); //加载解析urlencoded请求体的中间件
    app.use(cookieParser()); //加载解析cookie的中间件
};

module.exports = router;